﻿import { AfterViewInit, Component, Injector, ViewEncapsulation, ViewChild } from '@angular/core';
import { appModuleAnimation } from '@shared/animations/routerTransition';
import { AppComponentBase } from '@shared/common/app-component-base';
import { UserDelegationServiceProxy, MandatorDto } from '@shared/service-proxies/service-proxies';
import { ModalDirective } from 'ngx-bootstrap';
import { AddMemberModalComponent } from '@app/admin/organization-units/add-member-modal.component';

@Component({
    templateUrl: './mandator-list.component.html',
    selector: 'mandatorList'
})

export class MandatorListComponent extends AppComponentBase implements AfterViewInit {

     mandatorMembers: MandatorDto[];
     constructor(
        injector: Injector,
        private _UserDelegationServiceProxy: UserDelegationServiceProxy
    ) {
        super(injector);
    }
    blockedmandator = true;

    ngAfterViewInit(): void {
        this._UserDelegationServiceProxy
        .getMandators()
        .subscribe(result => {
            this.blockedmandator = false;
            this.mandatorMembers = result;

        });
    }
}
